<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>主表</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<t:base type="bootstrap,layer,validform,webuploader,bootstrap-form"></t:base>
<script src="${webRoot}/plug-in/lhgDialog/lhgdialog.min.js"></script>
<script src="${webRoot}/plug-in/jquery-plugs/i18n/jquery.i18n.properties.js"></script>
<script src="${webRoot}/plug-in/tools/curdtools.js"></script>
</head>
<body>
<div class="container" style="width:100%;overflow-x:hidden">
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body">
<form class="form-horizontal" role="form" id="formobj" action="fxjProMainController.do?doAdd" method="POST">
	<input type="hidden" id="btn_sub" class="btn_sub"/>
	<input type="hidden" id="id" name="id"/>
	<fieldset>
		<legend>产品详情</legend>
		<div class="main-form">
			<div class="row">
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							产品编号：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proNo" name="proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							产品名称：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proName" name="proName"  type="text" class="form-control input-sm" maxlength="132"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							产品图片：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
				<t:webUploader name="proPic" outJs="true" auto="true" showImgDiv="filediv_proPic" pathValues="${proPic}"></t:webUploader>
				<div class="form" id="filediv_proPic"></div>
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							生效时间：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
		            		<div class="input-group input-group-sm">
		            			<input id="proBdate" name="proBdate" type="text" class="form-control input-sm laydate-date" value="<fmt:formatDate pattern='yyyy-MM-dd' type='date' value='${proBdate}'/>"  ignore="ignore"  />
		            			<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
		            		</div>
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							失效时间：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
		            		<div class="input-group input-group-sm">
		            			<input id="proEdate" name="proEdate" type="text" class="form-control input-sm laydate-date" value="<fmt:formatDate pattern='yyyy-MM-dd' type='date' value='${proEdate}'/>"  ignore="ignore"  />
		            			<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
		            		</div>
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							产品种类：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proClass" name="proClass"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							融租类型：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proType" name="proType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							业务流程：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proWorkflow" name="proWorkflow"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							最低期数：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proMinPeriod" name="proMinPeriod"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							最高期数：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proMaxPeriod" name="proMaxPeriod"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							配置期数：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proPeriod" name="proPeriod"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							趸交保费比例：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proSinglePre" name="proSinglePre"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							最低贷款比例：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proMinLoanratio" name="proMinLoanratio"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							最高贷款比例：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proMaxLoanratio" name="proMaxLoanratio"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							是否需要首付：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proPayment" name="proPayment"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							首付比例：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proPaymentratio" name="proPaymentratio"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							实际利率：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proTrueratio" name="proTrueratio"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							结算利率：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proCreditingRate" name="proCreditingRate"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							保证金比例：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proDepositRatio" name="proDepositRatio"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							保证金还款方式：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proDepositRetype" name="proDepositRetype"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							返利比例：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proProfitRatio" name="proProfitRatio"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							融资总额：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proFinanceSum" name="proFinanceSum"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							融资渠道：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proFinanceCh" name="proFinanceCh"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							担保人：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proIsdb" name="proIsdb"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
				<div class="bt-item col-md-6 col-sm-6">
					<div class="row">
						<div class="col-md-3 col-sm-3 col-xs-3 bt-label">
							前缀：
						</div>
						<div class="col-md-8 col-sm-8 col-xs-8 bt-content">
							<input id="proPredix" name="proPredix"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
		            	</div>
					</div>
				</div>
			</div>
		</div>
	</fieldset>

	<ul class="nav nav-tabs" style="margin-bottom:0" id="subTabs">
		<li class="active"><a href="#fxjProAtt" data-toggle="tab">附件</a></li>  
		<li><a href="#fxjProContract" data-toggle="tab">合同</a></li>  
		<li><a href="#fxjProGps" data-toggle="tab">GPS</a></li>  
		<li><a href="#fxjProCost" data-toggle="tab">计算</a></li>  
		<li><a href="#fxjProCostCount" data-toggle="tab">其他计算</a></li>  
	</ul>
	<div class="tab-content" style="background-color:#fff;padding-top:10px;">
		<div class="tab-pane fade in active" id="fxjProAtt">  
			<div class="form-tb-toolbar">
				<button onclick="addOneRow('fxjProAtt_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加</button>
				<button onclick="deleteSelectRows('fxjProAtt_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-minus"></span>&nbsp;删除</button>
			</div>
	   		<div style="overflow-x:auto">
	   		<table class="table subinfo-table" id="fxjProAtt_table">
		   		<thead>
		   		<tr>
		   			<th align="center" style="width:25px;"></th>
					<th>产品编号</th>
					<th>产品名称</th>
					<th>文件类型</th>
					<th>文件</th>
				</thead>
				<tbody>
			  	<tr>
			  		<td class="form-ck"><input type="checkbox" name="ck"/></td>
					<td>
							<input id="fxjProAttList[0].proNo" name="fxjProAttList[0].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProAttList[0].proName" name="fxjProAttList[0].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProAttList[0].attType" name="fxjProAttList[0].attType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProAttList[0].attName" name="fxjProAttList[0].attName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
			  	</tr>
			 	</tbody>
			</table>
			</div>
		</div>
		<div class="tab-pane fade" id="fxjProContract">  
			<div class="form-tb-toolbar">
				<button onclick="addOneRow('fxjProContract_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加</button>
				<button onclick="deleteSelectRows('fxjProContract_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-minus"></span>&nbsp;删除</button>
			</div>
	   		<div style="overflow-x:auto">
	   		<table class="table subinfo-table" id="fxjProContract_table">
		   		<thead>
		   		<tr>
		   			<th align="center" style="width:25px;"></th>
					<th>产品编号</th>
					<th>产品名称</th>
					<th>合同模板</th>
				</thead>
				<tbody>
			  	<tr>
			  		<td class="form-ck"><input type="checkbox" name="ck"/></td>
					<td>
							<input id="fxjProContractList[0].proNo" name="fxjProContractList[0].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProContractList[0].proName" name="fxjProContractList[0].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
				            		<input onclick="onetomanyUpload('fxjProContractList[0].contractTemplate')" class="btn btn-default" type="button" value="上传附件" />	
									<input id="fxjProContractList[0].contractTemplate" type="hidden" name="fxjProContractList[0].contractTemplate" />
										<a target="_blank" class="btn btn-link"></a>
					</td>
			  	</tr>
			 	</tbody>
			</table>
			</div>
		</div>
		<div class="tab-pane fade" id="fxjProGps">  
			<div class="form-tb-toolbar">
				<button onclick="addOneRow('fxjProGps_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加</button>
				<button onclick="deleteSelectRows('fxjProGps_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-minus"></span>&nbsp;删除</button>
			</div>
	   		<div style="overflow-x:auto">
	   		<table class="table subinfo-table" id="fxjProGps_table">
		   		<thead>
		   		<tr>
		   			<th align="center" style="width:25px;"></th>
					<th>产品编号</th>
					<th>产品名称</th>
					<th>GPS厂家</th>
					<th>GPS内容</th>
					<th>是否支持安装</th>
					<th>GPS价格</th>
				</thead>
				<tbody>
			  	<tr>
			  		<td class="form-ck"><input type="checkbox" name="ck"/></td>
					<td>
							<input id="fxjProGpsList[0].proNo" name="fxjProGpsList[0].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProGpsList[0].proName" name="fxjProGpsList[0].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProGpsList[0].gpsCompany" name="fxjProGpsList[0].gpsCompany"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProGpsList[0].gpsContent" name="fxjProGpsList[0].gpsContent"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProGpsList[0].gpsInstall" name="fxjProGpsList[0].gpsInstall"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProGpsList[0].gpsPrice" name="fxjProGpsList[0].gpsPrice"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
			  	</tr>
			 	</tbody>
			</table>
			</div>
		</div>
		<div class="tab-pane fade" id="fxjProCost">  
			<div class="form-tb-toolbar">
				<button onclick="addOneRow('fxjProCost_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加</button>
				<button onclick="deleteSelectRows('fxjProCost_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-minus"></span>&nbsp;删除</button>
			</div>
	   		<div style="overflow-x:auto">
	   		<table class="table subinfo-table" id="fxjProCost_table">
		   		<thead>
		   		<tr>
		   			<th align="center" style="width:25px;"></th>
					<th>产品名称</th>
					<th>产品名称</th>
					<th>费用名称</th>
					<th>费用类型</th>
					<th>费用</th>
				</thead>
				<tbody>
			  	<tr>
			  		<td class="form-ck"><input type="checkbox" name="ck"/></td>
					<td>
							<input id="fxjProCostList[0].proNo" name="fxjProCostList[0].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostList[0].proName" name="fxjProCostList[0].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostList[0].costName" name="fxjProCostList[0].costName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostList[0].costType" name="fxjProCostList[0].costType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostList[0].costPrice" name="fxjProCostList[0].costPrice"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
			  	</tr>
			 	</tbody>
			</table>
			</div>
		</div>
		<div class="tab-pane fade" id="fxjProCostCount">  
			<div class="form-tb-toolbar">
				<button onclick="addOneRow('fxjProCostCount_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加</button>
				<button onclick="deleteSelectRows('fxjProCostCount_table')" type="button" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-minus"></span>&nbsp;删除</button>
			</div>
	   		<div style="overflow-x:auto">
	   		<table class="table subinfo-table" id="fxjProCostCount_table">
		   		<thead>
		   		<tr>
		   			<th align="center" style="width:25px;"></th>
					<th>产品编号</th>
					<th>产品名称</th>
					<th>费用名称</th>
					<th>费用类型</th>
					<th>费用</th>
				</thead>
				<tbody>
			  	<tr>
			  		<td class="form-ck"><input type="checkbox" name="ck"/></td>
					<td>
							<input id="fxjProCostCountList[0].proNo" name="fxjProCostCountList[0].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostCountList[0].proName" name="fxjProCostCountList[0].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostCountList[0].costCountName" name="fxjProCostCountList[0].costCountName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostCountList[0].costCountType" name="fxjProCostCountList[0].costCountType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
					<td>
							<input id="fxjProCostCountList[0].costCountPrice" name="fxjProCostCountList[0].costCountPrice"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
					</td>
			  	</tr>
			 	</tbody>
			</table>
			</div>
		</div>
	</div>
</form>
</div>
</div>
</div>
<table style="display:none">
	<tbody id="fxjProAtt_table_template">
		<tr>
			<td class="form-ck"><input type="checkbox" name="ck"/></td>
			<td>
							<input id="fxjProAttList[#index#].proNo" name="fxjProAttList[#index#].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProAttList[#index#].proName" name="fxjProAttList[#index#].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProAttList[#index#].attType" name="fxjProAttList[#index#].attType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProAttList[#index#].attName" name="fxjProAttList[#index#].attName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
		</tr>
	</tbody>
	<tbody id="fxjProContract_table_template">
		<tr>
			<td class="form-ck"><input type="checkbox" name="ck"/></td>
			<td>
							<input id="fxjProContractList[#index#].proNo" name="fxjProContractList[#index#].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProContractList[#index#].proName" name="fxjProContractList[#index#].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
				            		<input onclick="onetomanyUpload('fxjProContractList[#index#].contractTemplate')" class="btn btn-default" type="button" value="上传附件" />	
									<input id="fxjProContractList[#index#].contractTemplate" type="hidden" name="fxjProContractList[#index#].contractTemplate" />
										<a target="_blank" class="btn btn-link"></a>
			</td>
		</tr>
	</tbody>
	<tbody id="fxjProGps_table_template">
		<tr>
			<td class="form-ck"><input type="checkbox" name="ck"/></td>
			<td>
							<input id="fxjProGpsList[#index#].proNo" name="fxjProGpsList[#index#].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProGpsList[#index#].proName" name="fxjProGpsList[#index#].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProGpsList[#index#].gpsCompany" name="fxjProGpsList[#index#].gpsCompany"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProGpsList[#index#].gpsContent" name="fxjProGpsList[#index#].gpsContent"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProGpsList[#index#].gpsInstall" name="fxjProGpsList[#index#].gpsInstall"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProGpsList[#index#].gpsPrice" name="fxjProGpsList[#index#].gpsPrice"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
		</tr>
	</tbody>
	<tbody id="fxjProCost_table_template">
		<tr>
			<td class="form-ck"><input type="checkbox" name="ck"/></td>
			<td>
							<input id="fxjProCostList[#index#].proNo" name="fxjProCostList[#index#].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostList[#index#].proName" name="fxjProCostList[#index#].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostList[#index#].costName" name="fxjProCostList[#index#].costName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostList[#index#].costType" name="fxjProCostList[#index#].costType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostList[#index#].costPrice" name="fxjProCostList[#index#].costPrice"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
		</tr>
	</tbody>
	<tbody id="fxjProCostCount_table_template">
		<tr>
			<td class="form-ck"><input type="checkbox" name="ck"/></td>
			<td>
							<input id="fxjProCostCountList[#index#].proNo" name="fxjProCostCountList[#index#].proNo"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostCountList[#index#].proName" name="fxjProCostCountList[#index#].proName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostCountList[#index#].costCountName" name="fxjProCostCountList[#index#].costCountName"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostCountList[#index#].costCountType" name="fxjProCostCountList[#index#].costCountType"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
			<td>
							<input id="fxjProCostCountList[#index#].costCountPrice" name="fxjProCostCountList[#index#].costCountPrice"  type="text" class="form-control input-sm" maxlength="32"  ignore="ignore"  />
			</td>
		</tr>
	</tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
	formControlInit();
	//表单提交
	$("#formobj").Validform({
		tiptype:function(msg,o,cssctl){
			if(o.type==3){
				var oopanel = $(o.obj).closest(".tab-pane");
				var a = 0;
				if(oopanel.length>0){
					var panelID = oopanel.attr("id");
					if(!!panelID){
						var waitActive = $('#subTabs a[href="#'+panelID+'"]');
						if(!waitActive.hasClass("active")){
							waitActive.tab('show')
							a = 1;
						}
					}
				}
				if(a==1){
					setTimeout(function(){validationMessage(o.obj,msg);},366);
				}else{
					validationMessage(o.obj,msg);
				}
			}else{
				removeMessage(o.obj);
			}
		},
		btnSubmit : "#btn_sub",
		btnReset : "#btn_reset",
		ajaxPost : true,
		beforeSubmit : function(curform) {
		},
		usePlugin : {
			passwordstrength : {
				minLen : 6,
				maxLen : 18,
				trigger : function(obj, error) {
					if (error) {
						obj.parent().next().find(".Validform_checktip").show();
						obj.find(".passwordStrength").hide();
					} else {
						$(".passwordStrength").show();
						obj.parent().next().find(".Validform_checktip").hide();
					}
				}
			}
		},
		callback : function(data) {
			var win = frameElement.api.opener;
			if (data.success == true) {
				frameElement.api.close();
			    win.reloadTable();
			    win.tip(data.msg);
			} else {
			    if (data.responseText == '' || data.responseText == undefined) {
			        $.messager.alert('错误', data.msg);
			        $.Hidemsg();
			    } else {
			        try {
			            var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
			            $.messager.alert('错误', emsg);
			            $.Hidemsg();
			        } catch (ex) {
			            $.messager.alert('错误', data.responseText + "");
			            $.Hidemsg();
			        }
			    }
			    return false;
			}
		}
	});
});
function formControlInit(){
	$(".laydate-datetime").each(function(){
		if($(this).attr("name").indexOf('#index#')<=0){
			var _this = this;
			laydate.render({
			  elem: this,
			  format: 'yyyy-MM-dd HH:mm:ss',
			  type: 'datetime',
			  done:function(){
				  _this.focus();
			  }
			});
		}
	});
	$(".laydate-date").each(function(){
		if($(this).attr("name").indexOf('#index#')<=0){
			var _this = this;
			laydate.render({
			  elem: this,
			  done:function(){
				  _this.focus();
			  }
			});
		}
	});
	//单选框/多选框初始化
	$('.i-checks').iCheck({
		labelHover : false,
		cursor : true,
		checkboxClass : 'icheckbox_square-green',
		radioClass : 'iradio_square-green',
		increaseArea : '20%'
	});
}
//初始化下标
function resetTrNum(tableId) {
	$tbody = $("#"+tableId+"");
	$tbody.find('tbody > tr').each(function(i){
		$(':input, select,button,a', this).each(function(){
			var $this = $(this),validtype_str = $this.attr('validType'), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
			if(name!=null){
				if (name.indexOf("#index#") >= 0){
					$this.attr("name",name.replace('#index#',i));
				}else{
					var s = name.indexOf("[");
					var e = name.indexOf("]");
					var new_name = name.substring(s+1,e);
					$this.attr("name",name.replace(new_name,i));
				}
			}
			if(id!=null){
				if (id.indexOf("#index#") >= 0){
					$this.attr("id",id.replace('#index#',i));
				}else{
					var s = id.indexOf("[");
					var e = id.indexOf("]");
					var new_id = id.substring(s+1,e);
					$this.attr("id",id.replace(new_id,i));
				}
			}
			if(onclick_str!=null){
				if (onclick_str.indexOf("#index#") >= 0){
					$this.attr("onclick",onclick_str.replace(/#index#/g,i));
				}else{
				    var s = onclick_str.indexOf("[");
					var e = onclick_str.indexOf("]");
					var new_onclick_str = onclick_str.substring(s+1,e);
					if(new_onclick_str!=''){
						$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
					}
				}
			}
			if(validtype_str!=null){
				if(validtype_str.indexOf("#index#") >= 0){
					$this.attr("validType",validtype_str.replace('#index#',i));
				}
			}
			var class_str = $this.attr("class");
			if(!!class_str && class_str.indexOf("i-checks-tpl")>=0){
				$this.attr("class",class_str.replace(/i-checks-tpl/,"i-checks"));
			}
		});
		//$(this).find('div[name=\'xh\']').html(i+1);
	});
}
//新增一行
function addOneRow(tableId){
 	var tr =  $("#"+tableId+"_template tr").clone();
 	 $("#"+tableId).append(tr);
 	 resetTrNum(tableId);
 	 formControlInit();
}
//删除所选行
function deleteSelectRows(tableId){
	$("#"+tableId).find("input[name$='ck']:checked").parent().parent().remove();   
    resetTrNum(tableId); 
}
//通用弹出式文件上传
function onetomanyUpload(inputName){
    $.dialog({
           content: "url:${webRoot}/systemController.do?commonWebUpload",
           lock : true,
           title:"文件上传",
           zIndex:getzIndex(),
           width:700,
           height: 200,
           parent:windowapi,
           cache:false,
	       ok: function(){
	               var iframe = this.iframe.contentWindow;
	               var url = iframe.uploadCallback();
	               $("input[name='"+inputName+"']").val(url);
	               $("input[name='"+inputName+"']").next("a").attr("href","img/server/"+url+"?down=true").html("下载");
	               return true;
	       },
	       cancelVal: '关闭',
	       cancel: function(){
       	   } 
      });
  }
</script>
</body>
</html>